﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;

public partial class DemoPages_ALGridDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection sqlConn = null;
        SqlCommand sqlCmd = null;
        String strConnection = ConfigurationManager.ConnectionStrings["BusinessProcess"].ConnectionString;
        sqlConn = new SqlConnection(strConnection);
        sqlCmd = new SqlCommand("SELECT top 30 * FROM [BusinessProcessJobs]", sqlConn);
        sqlConn.Open();
        SqlDataAdapter ad = new SqlDataAdapter(sqlCmd);
        DataSet ds = new DataSet();

        ad.Fill(ds);

        this.Grid1.DataSource = ds.Tables[0];
        this.Grid1.DataBind();
        sqlConn.Close();
    }
}
